package com.cloud.service.impl;

import com.cloud.common.result.Result;
import com.cloud.common.result.ResultCode;
import com.cloud.service.PaymentHystrixService;
import org.springframework.stereotype.Component;
// 服务端宕机或关闭时,为服务接口提供统一降级处理
@Component
public class PaymentHystrixServiceImpl implements PaymentHystrixService {
    @Override
    public Result paymentFeignOK(Integer id) {
        return Result.failed(ResultCode.DEGRADATION,"paymentFeignOK:服务端宕机或关闭时,为服务接口提供统一降级处理");
    }

    @Override
    public Result paymentFeignTimeout(Long timeout) {
        return Result.failed(ResultCode.DEGRADATION,"paymentFeignTimeout:服务端宕机或关闭时,为服务接口提供统一降级处理");
    }
}
